package com.share.gateway.filter;

import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * 请求缓存过滤器
 *
 * @author
 */
@Component
public class CacheRequestFilter extends AbstractGatewayFilterFactory<Object>
{
    @Override
    public GatewayFilter apply(Object config)
    {
        return (exchange, chain) -> {
            // 缓存请求体逻辑实现
            return chain.filter(exchange);
        };
    }
}